package com.dot.dao.impl;

import java.util.List;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Repository;

import com.dot.dao.DwarfBookDao;
import com.dot.vo.DwarfBookVo;

@Repository("dwarfBookDao")
public class DwarfBookDaoMybatisImpl extends BaseDaoImpl<DwarfBookVo>  implements DwarfBookDao{
	
	public List<DwarfBookVo> getByParentCode(String pCode) throws Exception {
		return sqlSession.selectList(getSqlName("getByParentCode"), pCode);
	}
	
	
	public DwarfBookVo getByCode(String code) throws Exception {
		return sqlSession.selectOne(getSqlName("getByCode"), code);
	}

	public List<DwarfBookVo> getRootBook() throws Exception {
		return sqlSession.selectList(getSqlName("getRootBook"));
	}

}
